This database has been created to demonstrate some of the Apple event capabilities of FileMaker Pro version 3.0. The HyperCard stack
Report Card Browser
when used with this database, illustrates some of the interactions possible between FileMaker Pro, Apple
s HyperCard 2.2, and Microsoft Excel 4.0 applications.
This database includes scripts that:
Export data
Open the exported file in a spreadsheet (i.e. Excel 4.0)
Create either a chart or cross-tab report
It also include
s a script that can dial a phone by sending the appropriate Apple events to HyperCard.
We have tried to make each script as general as possible, so they can be used again in other applications besides the sample shown here.
Note that in order to use Apple events, you must be running System 7.0 or greater. Additionally, remember that Apple events requires that all
communicating
applications be running simultaneously.
nt capabilities of FileMaker Pro version 3.0. The HyperCard stack
Report Card Browser
when used with this database, illustrates some of the
eMaker Pro Apple Events Example Database
ried to make each scr
C+FileMaker Pro Apple Events Example Database
click the appropriate script. For more information about Apple events, please see the
FileMaker Events and Objects
database included with these examples.
C+FileMaker Pro Apple Events Example Database
ript. This script relies oC
n a special stack called
Phone Dialing Example
. To see this script, choose ScriptMaker from the Scripts menu, and double click the
Dial Phone
script. For more information on ScriptMaker and buttons, see tD
he FileMaker Pro 3.0 User
s Guide.
Phone Dialing Example
HyperCard stack is a simple stack that accepts a string of letters and numbers, and translates the string into the appropriate tones which dial a e have tried to make each scr
rm Averages
to automatically export data to a file called
Export Term
. These scripts will then open this file in Excel (using an
Open Document
event), and execute the appropriate Excel Macro (using the
Do Script
event). To see how to execute an Excel Macro, choose ScriptMaker from the Scripts menu, and double click the appropriate script. For more information about Apple events, please see the
Apple Events Reference
database included with these examples.
r Pro 2.1 an
d a modem.
There are also buttons that, when clicked, will create a bar chart or Cross tab report in Excel 4.0. The scripts that perform these actions are called
Excel Chart Term Avgs
, and
Excel Cross tabs by Term
. Each of these scripts first performs the script called
Export Term Averages
to automatically export data to a file called
Export Term
. These scripts will then open this file in Excel (using an
Open Document
event), and execute the appropriate Excel Macro (using th
33ffff
33ff33
3333ff
333333
wwwwww
UUUUUU
DDDDDD
""""""
ta has been retrieved from FileMaker). To modify a grade, click on the appropriate grade and type the new value. In order to update this grade in this FileMaker database, click the
Send Data
button. If the data has been changed in FileMaker, you can update the stack by clicking the
Retrieve Data
button.
To see the student list again, click the
Index
button. To add a new record to the FileMaker database, click the
New Record
button. You will then be prompted for information. AfterCf all the information has been entered, click the
Add Record
button to update the FileMaker database.
E+FileMaker Pro Apple Events Example Database
will then be prompted for information. After all the information has been entered, click the
Add Record
F(button to update the FileMaker database.
ed with these examples.
Show Report Cards...C
Stacks
Report Card Browser
is a simple stack that relies on several AppleEvents to retrieve data from FileMaker Pro and send data to FileMaker Pro. The use of this stack should be straight forward to anyone familiar with HyperCard: connect to the database, and a list of students will appear (note that the list of students was retrieved from FileMaker). To view all the data for a student, just click the name. The stack will now show a card with all the grades for that student (again, this da send data to FileMaker Pro. The use of this stack should be straight forward to anyone familiar with HyperCard: connect to the database, and a list of students will appear (note that the list of students was retrieved from FileMaker). To view all the data for a student, just click the name. The stack will now show a card with all the grades for that student (again, this da
cribed.
ffffff
ffff33
ff33ff
ff3333
Walter DavidsenC
555-1515D
76.25R
81.25S
78.3333333333333333T
78.3333333333333333U
78.3333333333333333V
81.6666666666666667W
79.1666666666666667
Julie MasonB
Stanley MasonC
555-7812D
91.25Q
83.75R
81.25S
83.3333333333333333U
81.6666666666666667V
86.6666666666666667W
85.4166666666666667
A Ian ScottB
Sonia ScottC
555-9864D
72.5Q
73.75R
72.5S
81.6666666666666667W
72.9166666666666667
Startup script
Excel Chart Term Avgs
Excel Cross tabs by Term
Export Term Averages
Show report cards
Open HyperCard stacks
Export Term Averages
Excel Chart Term Avgs
Excel Bar Chart Script
aevtodoc
Export term
#gvS@g
aevtodoc
miscdosc
-RUN("'Excel Bar Chart Script'!Record1",FALSE)
aevtodoc
aevtodoc
FCmiscdosc
-RUN("'Excel Bar Chart Script'!Record1",FALSE)
Excel Cross tabs by Term
Excel Cross-tabs Script
aevtodoc
Export Term
#gvS@g
aevtodoc
miscdosc
-RUN("'Excel Cross-tabs Script'!Macro2",FALSE)
aevtodoc
aevtodoc
FCmiscdosc
-RUN("'Excel Cross-tabs Script'!Macro2",FALSE)
Startup script
Open HyperCard stacks
aevtodoc
Show report cards
Recov
Yesfter
Noarter
Student NameB
Yesfter
Noarter
Pro 2.0F!
Pro 3.0
&6f`9
33ript
MSPCA
NAMEA
Excel Cross-tabs Script
FPTHA
Report Card Browser
MSPCA
NAMEA
Report Card Browser
Phone Dialing Example
11/1/95
CHILD
ENGLISH AVERAGE
FALL AVERAGE
FALL ENGLISH
FALL HISTORY
FALL MATH
HISTORY AVERAGE
MATH AVERAGE
OVERALL AVERAGE
PARENT
PHONE NUMBER
SPRING AVERAGE
SPRING ENGLISH
SPRING HISTORY
SPRING MATH
SUMMER AVERAGE
SUMMER ENGLISH
SUMMER HISTORY
SUMMER MATH
WINTER AVERAGE
WINTER ENGLISH
WINTER HISTORY
WINTER MATH
Helvetica
Geneva
Palatino
Times
Monaco
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
January
February
March
April
August
September
October
November
December
1st Quarter
2nd Quarter
3rd Quarter
4th Quarter
Spring EnglishB
Summer EnglishB
Math AverageB
History AverageB
English AverageB
Summer English)/4mmer English)/4
Complete Report
Basic Info
Student Name
Averages
Intro
Intro 2
Intro 3
Student Names
Complete ReportB
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Chart Term Averages[ Excel 4.0\ Averages:]
English:^
History:_
Math:`
Summera
Averagesb
Springc
Winterd
Falle
Phone Numberf
Parentg
Child
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Phone NumberE
ParentF
Child
Student NameB
Yesfter
Noarter
Child
IntroB
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Yesfter
Noarter
Intro 2B
Continue...
The example used is a report card database for elementary school students. It is a very simple database, with fields for grades, averages, the student
s names, a parent
s name, and a phone number.
Clicking the Chart Term Averages or Cross Tabs by Term buttons will create a bar chart or Cross tab report in Excel 4.0. The scripts that perform these actions are called
Excel Chart Term Avgs
, and
Excel Cross tabs by Term
. Each of these scripts first performs the script called
Export Te
Intro 3B
hnical information about using these Apple event examples, please refer to the Stack info button in the
Report Card Browser
stack. It is important to note that this documentatio
Z+FileMaker Pro Apple Events Example Database
tried to make each script as general as possible, so they can be used again in other applications besides the sample shown here.
Note that in order to use Apple events, you must be running System 7.0 or greater. Additionally, remember that Apple events requires that all
communicating
applications be running simultaneously.
Z+FileMaker Pro Apple Events Example Database
s grade in this FileMaker database, click the
Send Data
button. If the data has been changed in FileMaker, you can update the stack by clicking the
Retrieve Data
button.
To see the student list again, clicE
k the
Index
button. To add a new record to the FileMaker database, click the
New Record
button. You will then be prompted for information. After all the information has been entered, click the
Add Record
F(button to update the FileMaker database.
. The scripts that perform these actions are called
Excel Chart Term Avgs
, and
Excel Cross tabs by Term
. Each of these scripts first performs the script caG
lled
Export Term Averages
to automatically export data to a file called
Export Term
. These scripts will then open this file in Excel (using an
Open Document
event), and execute the appropriate Excel Mac
To start using the Apple events examples, simply click the
Open Stacks
button above to launch HyperCard (if it is not already launched) and open the
Phone Dialer
stack and the
Report Card Browser
stack. Then click the
Show Report Cards
button to start using this database as explained above.
For more technical information about using these Apple event examples, please refer to the Stack info button in the
Report Card Browser
stack. It is important to note that this documentatio
en is written for people who are proficient with the HyperCard application and the HyperTalk language. It is also important to note that this documentation should be used in conjunction with the
Apple Events Reference
database. In that database FileMaker Pro
s implementation of the Object Model and the FileMaker Pro containment hierarchy are described.